package com.bitin.adorn.common.exception;

import com.bitin.adorn.common.payload.IResultCode;
import lombok.Getter;

/**
 * 自定义业务异常
 *
 * @author Mr.Lu
 * @since 2024/5/24 17:38
 */
@Getter
public class BizException extends RuntimeException {

    public IResultCode iResultCode;

    public BizException(IResultCode iResultCode) {
        super(iResultCode.getMessage());
        this.iResultCode = iResultCode;
    }

    public BizException(String message){
        super(message);
    }

    public BizException(IResultCode iResultCode, String message) {
        super(message);
        this.iResultCode = iResultCode;
    }

    public BizException(String message, Throwable cause){
        super(message, cause);
    }

    public BizException(Throwable cause){
        super(cause);
    }
}
